import React,{Component} from "react";
import {Switch,Route,Redirect} from "react-router-dom";

import Home from "./view/home/home";
import Detail from "./view/detail/detail";

export default class RouterIndex extends Component {
    render(){
        return (
            <Switch>
                <Route path="/" exact render={()=>(<Redirect to="/Home" />)}/>
                <Route path="/home" component={Home}/>
                <Route path="/Detail" component={Detail}/>
            </Switch>
        );
    }
}